package ca.jsbr.as2js_lib.event 
{
	/**
	 * ...
	 * @author jsbr [me@jsbr.ca]
	 */
	public class KeyboardJSEvent 
	{
		
		static public const KEYUP:String = "keyup";
		static public const KEYDOWN:String = "keydown";
		static public const KEYPRESS:String = "keypress";
		
		private var _keycode:int;
		private var _keychar:String;
		private var _type:String;
		private var _currentTarget:Object;
		private var _skip:Boolean;
		
		public function KeyboardJSEvent(type:String,keycode:int,keychar:String) 
		{
			_type = type;
			_keychar = keychar;
			_keycode = keycode;
			
		}
		
		public function get keyCode():int 
		{
			return _keycode;
		}
		
		public function get keyChar():String 
		{
			return _keychar;
		}
		
		public function get type():String 
		{
			return _type;
		}
		
		public function get currentTarget():Object 
		{
			return _currentTarget;
		}
		
		public function set currentTarget(value:Object):void 
		{
			_currentTarget = value;
		}
		
		public function get skip():Boolean 
		{
			return _skip;
		}
		
		public function stopPropagation():void
		{
			_skip = true;
		}
	}

}